package test.spring;

import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import su.domain.Emp;
import su.service.EmpService;

import java.util.ArrayList;
import java.util.List;

public class mybatis {

    @Test
    public void spring() {
        ApplicationContext ac = new ClassPathXmlApplicationContext("classpath:bean.xml");
        EmpService empService = (EmpService) ac.getBean("EmpServiceImpl");
//        Emp emp = new Emp();
//        emp.setId(1);
//        emp.setEmail("212@qq.com");
//        emp.setName("憨憨");
//        emp.setGender("男");
//        emp.setIdtodepid(1);
//        System.out.println(empService.updatebyid(emp));
//        System.out.println(empService.delempbyid(10));
//        String[] str = new String[]{"2", "3", "5"};
//        List<Integer> list = new ArrayList<>();
//        list.add(17);
//        list.add(39);
//        empService.delempall(list);

    }
}
